package com.hyz.assetManager.controller;

import com.hyz.assetManager.pojo.AssetInboundRequest;
import com.hyz.assetManager.service.AssetManagerService;
import com.hyz.pkg.pojo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author HGD
 * @date 2022/9/26 14:25
 */
@RestController
@RequestMapping("/assetManager")
public class AssetManagerController {
    @Autowired
    private AssetManagerService assetManagerService;

    @PostMapping("/upload")
    public ResponseResult<String> uploadAsset(@RequestBody MultipartFile file) {
        return assetManagerService.uploadAsset(file);
    }

    @PostMapping("/batchInbound")
    public ResponseResult<String> batchInbound(@RequestBody AssetInboundRequest assetInboundRequest) {
        return assetManagerService.batchInbound(assetInboundRequest);
    }

}
